package com.yzcrm.erp.kms.common;

public enum KmsEnum {
    /**
     * Product Enum
     */
    STUDY_STATUS_WAIT("wait",0,"等待学习"),
    STUDY_STATUS_STUDYING("studying",1,"学习中"),
    STUDY_STATUS_COMPLETE("complete",2,"完成学习"),

    CRM_NULL("NULL",0,"NULL")
    ;

    private final String name;
    private final int  type;
    private final String remarks;
    KmsEnum(String name, int type, String remarks) {
        this.name = name;
        this.type = type;
        this.remarks = remarks;
    }
    public static KmsEnum parse(int type) {
        for (KmsEnum Enum : KmsEnum.values()) {
            if (Enum.getType()==type) {
                return Enum;
            }
        }
        return CRM_NULL;
    }

    public static KmsEnum parse(String name) {
        for (KmsEnum Enum : KmsEnum.values()) {
            if (Enum.getName().equals(name)) {
                return Enum;
            }
        }
        return CRM_NULL;
    }

    public String getName() {
        return name;
    }

    public int getType() {
        return type;
    }

    public String getRemarks() {
        return remarks;
    }

}
